package com.focusai.efairy.ui.activity.report;

import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;

import com.focusai.efairy.R;
import com.focusai.efairy.ui.base.BaseFragmentActivity;
import com.focusai.efairy.ui.fragment.ReportFragment;

/**
 * Created by luo_guangwen on 2017/8/1.
 */

public class ReportActivity extends BaseFragmentActivity{
    public static final String KEY_PROJECT_ITEM_ID = "key_project_item";
    public static final String KEY_PROJECT_ITEM_NAME = "key_project_name";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_report);
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        Bundle bundle = new Bundle();
        bundle.putString(KEY_PROJECT_ITEM_ID, getIntent().getStringExtra(KEY_PROJECT_ITEM_ID));
        ReportFragment fragment = new ReportFragment();
        fragment.setArguments(bundle);
        transaction.add(R.id.fragment_container, fragment);
        transaction.commit();
    }

    @Override
    public void initTitte() {
        setCenterTitleName(getIntent().getStringExtra(KEY_PROJECT_ITEM_NAME));
    }
}
